package com.practice.springboot_01_zwj.service;

import com.practice.springboot_01_zwj.entity.ConditionRequest;
import com.practice.springboot_01_zwj.entity.IncomeQuestion;
import com.practice.springboot_01_zwj.entity.PageRequest;
import com.practice.springboot_01_zwj.entity.PageResult;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface IncomeQuestionService {
    // 统一查询方法
    PageResult<IncomeQuestion> selectByOperation(
            String operationType,
            String areaCode,
            AreaType areaType,
            IncomeQuestion condition,
            PageRequest pageRequest
    );

    List<IncomeQuestion> selectProvinceTotalIncomeAll(String provinceCode, IncomeQuestion condition);

    List<IncomeQuestion> selectCityTotalIncomeAll(String cityCode, IncomeQuestion condition);

    // 区域类型枚举
    enum AreaType {
        PROVINCE, CITY
    }
    List<IncomeQuestion> selectIncomeQuestionAll();
    // 新增分页方法
    PageResult<IncomeQuestion> selectIncomeQuestionPage(PageRequest pageRequest);

    Map<String,Object> selectIncomeByCityCode(String cityCode,String yearFilter);
    Map<String,Object> selectIncomeByProvinceCode(String provinceCode,String yearFilter);
    Map<String,Object> selectMgrByCityCode(String cityCode,String yearFilter);
    Map<String,Object> selectMgrByProvinceCode(String provinceCode,String yearFilter);
    Map<String,Object> selectQuestionByCityCode(String cityCode,String yearFilter);
    Map<String,Object> selectQuestionByProvinceCode(String provinceCode,String yearFilter);
    // 新增分页方法
    PageResult<IncomeQuestion> selectProvinceTotalIncomePage(String provinceCode, IncomeQuestion incomeQuestion,PageRequest pageRequest);
    PageResult<IncomeQuestion> selectCityTotalIncomePage(String cityCode, IncomeQuestion incomeQuestion,PageRequest pageRequest);
    List<IncomeQuestion> selectCityCollection();
}
